<?php
/**
 * @file test013.php
 * @desc 测试preg_match函数
 * 
 * 	actWorkerDuty_0
 */ 
header("Content-Type:text/html;charset=UTF-8");
$worker = array('actWorkerDuty_0','actWorkerDuty_1','actWorkerDuty_2',
	'actWorkerNick_0','actWorkerNick_1','actWorkerNick_2',
	'actRoomNumOdd','actKMsgTime_1' );

$i = 0;
foreach ($worker as $w){
	if(  preg_match('/^actWorkerDuty.*/', $w, $matches) )
		$i++;
}

echo $i;
//echo preg_match('/^actWorkerDuty.*/', $worker[3], $matches); 
//var_dump( $matches );




/* 测试 函数 iconv_substr 与 mb_substr 的区别 */
$str = "出cv♪moia乏味费利佩发了师傅空儿房价是大家覅见覅见";

echo "<br />\t\n".iconv_substr($str, 0,5, 'UTF-8');
echo "<br />\t\n".mb_substr($str, 0,5, 'UTF-8');



echo "<br />\t\n".(6%3);
	
?>